<?php

namespace app\common\model\Product;

use think\Model;

class Cart extends Model
{
  protected $name = 'cart';

  protected $autoWriteTimestamp = false;

  // 定义时间戳字段名
  protected $createTime = false;
  protected $updateTime = false;
  protected $deleteTime = false;

  protected $append = [];

  // 忽略数据表不存在的字段
  protected $field = true;

  public function product()
  {
    return $this->belongsTo('app\common\model\Product\Product', 'proid', 'id', [], 'LEFT')->setEagerlyType(0);
  }
}
